package qotwReader.question;
/*
import java.awt.image.BufferedImage;
import java.util.regex.*;

import javax.imageio.ImageIO;


import utils.*;
*/

//import net.htmlparser.jericho.*;

import java.io.*;
import java.net.*;

import qotwReader.types.*;

public class Question
{
    final private QuestionHTML html;
    final private QuestionFile file;
    final private QuestionEbook epub;
    
    final private QuestionData data;
    
    public Question(URL url, ReaderType reader, EbookType outputEbook, File containsEbookConvert) throws IOException
    {
        System.out.println("Getting question html");
        this.html = new QuestionHTML(url);
        System.out.println("OK");
        
        System.out.println("Getting question data");
        data = new QuestionData(html, reader);
        System.out.println("OK");
        
        System.out.println("Writing question html to local file");
        this.file = new QuestionFile(html, data);
        System.out.println("OK");
        
        System.out.println("Converting to ebook, type " + outputEbook.toString());
        this.epub = new QuestionEbook(file, data);
        
        epub.convertToFormat(outputEbook, containsEbookConvert);
        
        System.out.println("OK");
        }
}
